home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / tffdsply.hqx / checktraps.c next >
Text File  |  1993-01-04  |  973b  |  53 lines

  1. /*
  2.  * This software is copyright 1992 by Robert Morris.
  3.  * You may freely redistribute this software as shareware
  4.  * if you do so in the same form as you got it. If you find
  5.  * this software useful, please send $12 to:
  6.  *   Robert Morris
  7.  *   P.O. Box 1044
  8.  *   Harvard Square Station
  9.  *   Cambridge, MA 02238
  10.  *   ecognome@aol.com
  11.  * If you incorporate any of this software in any kind of
  12.  * commercial product, please send $2 per copy distributed
  13.  * to the above address.
  14.  */
  15.  
  16.  
  17. int
  18. HasQD32()
  19. {
  20.     if(HasColorQD() == 0)
  21.         return(0);
  22. #define QD32Trap 0xAB03
  23. #define UnImplTrap 0xA89F
  24.     if(NGetTrapAddress(QD32Trap, ToolTrap) == NGetTrapAddress(UnImplTrap, ToolTrap))
  25.         return(0);
  26.     return(1);
  27. }
  28.  
  29. int
  30. HasColorQD()
  31. {
  32.     SysEnvRec se;
  33.     int err;
  34.     
  35.     err = SysEnvirons(1, &se);
  36.     if(err != 0)
  37.         return(0);
  38.     if(se.hasColorQD == TRUE)
  39.         return(1);
  40.     return(0);
  41. }
  42.  
  43. int
  44. HasSystem7()
  45. {
  46.     SysEnvRec se;
  47.     
  48.     if(SysEnvirons(1, &se) < 0)
  49.         return(0);
  50.     else
  51.         return(se.systemVersion >= 0x0700);
  52. }
  53.